package com.milk.controller.user;


import com.milk.entity.Carousels;
import com.milk.result.Result;
import com.milk.service.ICarouselsService;
import com.milk.vo.CarouselsVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user/carousels")
@ApiModel(value = "首页轮播图")
public class CarouselsController {
    @Autowired
    private ICarouselsService carouselsService;

    /**
     * 查询所有轮播图
     * @return
     */
    @GetMapping
    @ApiModelProperty("查询所有轮播图")
    private Result<CarouselsVO> selectAll(){
        CarouselsVO list = carouselsService.selectAll();
        return Result.success(list);
    }
}
